<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html" />
<title>创意管理{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html" />
<include file="Public/ADMIN/HTML/Left_list/idea_left_list.html" />
<script>
	function delIdea(iid){
		address = "{$Think.const.DOMAIN_NAME}Admin/Idea/ideaDel/id/"+iid; // 设置$.get调用路径
		var delTr = document.getElementById(iid);                          // 获取动态的表格ID
		$.get(address,function(str){
			if(str==0){
				ZENG.msgbox.show("删除成功！", 4, 1000);
				delTr.parentNode.removeChild(delTr);                       // 删除该行
			}else{
				ZENG.msgbox.show("删除失败！请重试！", 5, 2000);
			}
		});
	}
</script>
<div class="container-fluid main-content">
	<!-- DataTables Example -->
	<div class="row">
		<div class="col-lg-10">
			<div class="widget-container fluid-height clearfix">
				<div class="heading">
					<i class="icon-plus-sign-alt"></i>创意列表
				</div>
				<div class="widget-content padded clearfix">
					<table class="table table-bordered table-striped dataTable"
						id="datatable-editable">
						<thead>
							<th style="width: 10%; text-align: center">序号</th>
							<th style="width: 30%; text-align: center">标题</th>
							<th style="width: 11%; text-align: center">发布人</th>
							<th style="width: 12%; text-align: center">允许公开</th>
							<th class="hidden-xs" style="width: 12%; text-align: center">允许评论</th>
							<th class="hidden-xs" style="width: 15%; text-align: center">发布时间</th>
							<th style="width: 10%; text-align: center">操作</th>
						</thead>
						<tbody>
							<assign name="num" value="1" />
							<volist name="ideasInfo" id="vo">
							<tr id="{$vo.iid}">
								<td style="text-align: center;">{$num++}</td>
								<td><a
									href="{$Think.const.DOMAIN_NAME}Home/Idea/details/iid/{$vo.iid}"
									target="_blank">{$vo.idea}</a></td>
								<td style="text-align: center">{$vo.ideaman}</td>
								<td class="hidden-xs" style="text-align: center"><if
										condition="$vo.ispublic neq '0'">
									<span class="label label-warning">不公开</span> <else />
									<span class="label label-success">公开</span> </if></td>
								<td class="hidden-xs" style="text-align: center"><if
										condition="$vo.iscomment neq '0'">
									<span class="label label-warning">不允许评论</span> <else />
									<span class="label label-success">允许评论</span> </if></td>
								<td class="hidden-xs" style="text-align: center">{$vo.idate}</td>
								<td class="actions">
									<div class="action-buttons">
										<a class="table-actions"
											onclick="if(confirm('确定要删除 {$vo.idea} 吗?')==false){ return false; }else{ javascript:delIdea({$vo.iid}) }"><i
											class="icon-trash" title="删除" style="margin-left: 30%"></i> </a>
									</div>
								</td>
							</tr>
							</volist>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	<!-- end DataTables Example -->
</div>
</div>
</body>
</html>